import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class GlobalService {
  private readonly messageText = new BehaviorSubject<any>('');
  constructor() { }
  getMessageText() {
    return this.messageText;
  }
  setMessageText(isShowMessage: boolean, text: string) {
    this.messageText.next({
      text,
      isShowMessage
    });
  }
}
